<script>
	export default {
		globalData: {
			navHeight: 0,
			StatusBar: 0,
			Custom: 0,
			CustomBar: 0,
			userInfo: null,
			openid: 123,
			session_key: null,
			city: '',
			area_id:'',
			order_status:-1,
			order_state: 0,
			partner_isshow:true,
			
		},
		onLaunch: function() {
			// 获取导航高度；
			var that = this;
			uni.getSystemInfo({
				success: res => {
					var a = res.model;
					if (a.indexOf("iPhone") != -1 && a.indexOf("X") != -1) { //是不是包含iphoneX
						that.globalData.isIphoneX = true
					} else {
						that.globalData.isIphoneX = false
					};

					//导航高度
					this.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 97;
					this.globalData.StatusBar = res.statusBarHeight;
					let capsule = uni.getMenuButtonBoundingClientRect();
					if (capsule) {
						this.globalData.Custom = capsule;
						this.globalData.CustomBar = capsule.bottom + capsule.top - res.statusBarHeight;
					} else {
						this.globalData.CustomBar = res.statusBarHeight + 50;
					}

				},
				fail(err) {}
			});
		},
	
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "@/uni_modules/uview-ui/index.scss";
	/*每个页面公共css */
	@import "static/iconfont/iconfont.css";
	@import "static/css/base.css";
	@import "static/font/font.css";

	.psc {
		color: $uni-text-color-placeholder;
	}
</style>
